package cn.myfirefly.moming.common.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.myfirefly.moming.common.dao.RoleDataAuthDao;

@Service
@Transactional
public class RoleDataAuthService {

	@Autowired
	private RoleDataAuthDao roleDataAuthDao;
	
	public Integer getDeptIdByLoginName(String loginName) {
		return roleDataAuthDao.getDeptIdByLoginName(loginName);
	}
	
	public String getDeptNameByLoginName(String loginName) {
		return roleDataAuthDao.getDeptNameByLoginName(loginName);
	}
	
	public List<Integer> getUserIdByDeptId(Integer deptId) {
		return roleDataAuthDao.getUserIdByDeptId(deptId);
	}
	
	public List<String> getUserNameByDeptId(Integer deptId) {
		return roleDataAuthDao.getUserNameByDeptId(deptId);
	}
}
